Skip to content

Conversation

@sanderegg
Copy link
Member

@sanderegg sanderegg commented Apr 8, 2025

What do these changes do?

  • new ENV PRIMARY_EC2_INSTANCES_RABBIT for setting RabbitMQ settings in user private clusters

This PR shall allow private cluster autoscaling to send logs to the main simcore rabbitMQ.
This is a pre-requisite to see logs about scaling up/down of clusters and also send information about the cluster current status.

Related issue/s

How to test

Dev-ops checklist

@codecov
Copy link

codecov bot commented Apr 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.63%. Comparing base (5e1323e) to head (46b7dbc).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7485      +/-   ##
==========================================
+ Coverage   87.60%   87.63%   +0.03%     
==========================================
  Files        1758     1751       -7     
  Lines       68116    67942     -174     
  Branches     1124     1124              
==========================================
- Hits        59672    59540     -132     
+ Misses       8135     8093      -42     
  Partials      309      309              
Flag Coverage Δ
integrationtests 65.10% <ø> (+0.01%) ⬆️
unittests 86.81% <100.00%> (+0.01%) ⬆️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library 93.91% <ø> (ø)
pkg_dask_task_models_library 97.09% <ø> (ø)
pkg_models_library 92.69% <100.00%> (+<0.01%) ⬆️
pkg_notifications_library 85.26% <ø> (ø)
pkg_postgres_database 88.18% <ø> (ø)
pkg_service_integration 69.98% <ø> (ø)
pkg_service_library 72.78% <ø> (ø)
pkg_settings_library 90.90% <100.00%> (+0.06%) ⬆️
pkg_simcore_sdk 85.40% <ø> (ø)
agent 96.46% <ø> (ø)
api_server 91.23% <ø> (ø)
autoscaling 96.08% <ø> (ø)
catalog 92.46% <ø> (ø)
clusters_keeper 99.25% <100.00%> (+<0.01%) ⬆️
dask_sidecar 91.29% <ø> (ø)
datcore_adapter 98.12% <ø> (ø)
director 76.78% <ø> (ø)
director_v2 91.36% <ø> (-0.02%) ⬇️
dynamic_scheduler 97.40% <ø> (ø)
dynamic_sidecar 90.11% <ø> (ø)
efs_guardian 89.79% <ø> (ø)
invitations 93.28% <ø> (ø)
payments 92.66% <ø> (ø)
resource_usage_tracker 89.12% <ø> (-0.11%) ⬇️
storage 87.58% <ø> (-0.08%) ⬇️
webclient ∅ <ø> (∅)
webserver 86.04% <ø> (+0.01%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5e1323e...46b7dbc. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sanderegg sanderegg force-pushed the clusters-keeper/connect-primary-to-rabbitmq branch 2 times, most recently from 6ab02df to 2bf6e94 Compare April 8, 2025 20:29
@sanderegg sanderegg marked this pull request as ready for review April 8, 2025 20:59
@sanderegg sanderegg requested a review from mguidon April 8, 2025 21:00
Copy link
Collaborator

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@sanderegg sanderegg force-pushed the clusters-keeper/connect-primary-to-rabbitmq branch 3 times, most recently from a1c0e94 to 9c35879 Compare April 9, 2025 22:15
Copy link
Contributor

@YuryHrytsuk YuryHrytsuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you elaborate on open ports on self-hosted rabbit containers? I don't fully follow

@sanderegg sanderegg force-pushed the clusters-keeper/connect-primary-to-rabbitmq branch from 9c35879 to 47f6be2 Compare April 23, 2025 06:19
@giancarloromeo giancarloromeo requested a review from Copilot April 23, 2025 06:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR integrates RabbitMQ settings for autoscaling in private clusters by introducing a new environment variable and updating related settings and tests.

  • Added a new environment variable to inject RabbitMQ settings into Docker Compose.
  • Updated the settings schema, tests, and related utilities to propagate and validate the RabbitMQ configuration.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
services/docker-compose.yml Added PRIMARY_EC2_INSTANCES_RABBIT_SETTINGS environment variable for RabbitMQ.
services/clusters-keeper/tests/unit/test_utils_clusters.py Included new RabbitMQ fixtures and tests to verify RabbitMQ settings propagation.
services/clusters-keeper/tests/unit/test_modules_dask.py Updated TLSAuthentication usage to the new model_json_schema() pattern.
services/clusters-keeper/tests/unit/conftest.py Modified fixture to properly unset RABBIT_HOST when disabling RabbitMQ.
services/clusters-keeper/src/simcore_service_clusters_keeper/utils/clusters.py Appended AUTOSCALING_RABBITMQ into environment variables using RabbitSettings.
services/clusters-keeper/src/simcore_service_clusters_keeper/data/docker-compose.yml Injected AUTOSCALING_RABBITMQ in the deploy compose file.
services/clusters-keeper/src/simcore_service_clusters_keeper/core/settings.py Added PRIMARY_EC2_INSTANCES_RABBIT field in the settings schema.
services/autoscaling/tests/unit/test_modules_dask.py Reformatted async call for task results, along with TLSAuthentication update.
packages/settings-library/src/settings_library/rabbit.py Revised allowed_schemes typing and JSON schema examples for Rabbit settings.
packages/models-library/src/models_library/clusters.py Updated schema examples for TLSAuthentication and cluster configuration.
Comments suppressed due to low confidence (1)

services/docker-compose.yml:223

  • Environment variable 'PRIMARY_EC2_INSTANCES_RABBIT_SETTINGS' is inconsistent with the settings field 'PRIMARY_EC2_INSTANCES_RABBIT'. Consider renaming it to 'PRIMARY_EC2_INSTANCES_RABBIT' for consistency.
PRIMARY_EC2_INSTANCES_RABBIT_SETTINGS: ${PRIMARY_EC2_INSTANCES_RABBIT_SETTINGS}

@sonarqubecloud
Copy link

@sanderegg sanderegg enabled auto-merge (squash) April 23, 2025 07:18
@sanderegg sanderegg merged commit f407644 into ITISFoundation:master Apr 23, 2025
83 of 94 checks passed
@sanderegg sanderegg deleted the clusters-keeper/connect-primary-to-rabbitmq branch April 23, 2025 07:22
@YuryHrytsuk YuryHrytsuk changed the title ✨Computational clusters: connect autoscaling to RabbitMQ ✨Computational clusters: connect autoscaling to RabbitMQ :devops: Apr 24, 2025
@YuryHrytsuk YuryHrytsuk changed the title ✨Computational clusters: connect autoscaling to RabbitMQ :devops: ✨Computational clusters: connect autoscaling to RabbitMQ ⚠️ Apr 24, 2025
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request May 8, 2025
34 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants